import { OlympicGuessAllData } from "../data/OlympicGuessAllData";
import { OlympicGuessDesc } from "../item/OlympicGuessDesc";
import { Language } from "../../../../../extend/language/Language";
import { GameConst } from "../../../../component/gconst/GameConst";
import { OlympicGuessTotalItem } from "../item/OlympicGuessTotalItem";
import { ObjCreate } from "../../common/ObjCreate";
import { ImagesConst } from "../../../resource/ImagesConst";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { FontUtil } from "../../../../common/font/FontUtil";
//class OlympicGuessTotalWin
    
    export  class OlympicGuessTotalWin /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.initView();
            return;
        }

        public updateData(arg1: OlympicGuessAllData): void
        {
            if (arg1 == null) 
            {
                return;
            }
            this._txtGoingDays.text = arg1.goingDays.toString();
            this._txtRightDays.text = arg1.myTotalRightDays.toString();
            return;
        }

        /* internal  */initView(): void
        {
            var loc6=null;
            var loc7=null;
            this._desc = new OlympicGuessDesc();
            this.addChild(this._desc);
            this._desc.setDesc2RowPlace();
            this._desc.desc = Language.getString(80002);
            var loc1=[];
            var loc2=[GameConst.OlympicGuessAllWin, GameConst.OlympicGuess10Win, GameConst.OlympicGuess7Win, GameConst.OlympicGuess3Win, GameConst.OlympicGuess2Win];
            var loc3=0;
            while (loc3 < 5) 
            {
                loc6 = Language.getString(80035 + loc3);
                (loc7 = new OlympicGuessTotalItem(this.URLs[loc3] as string, loc6, loc2[loc3])).x = 22 + loc3 * 136;
                loc7.y = 77;
                this.addChild(loc7);
                ++loc3;
            }
            ObjCreate.createBg(98, 229, 517, 30, this, ImagesConst.FightingStrgBg);
            var loc4;
            (loc4 = new Object /* flash.display.Bitmap */()).x = 110;
            loc4.y = 236;
            this.addChild(loc4);
            loc4.bitmapData = GlobalClass.getBitmapData(ImagesConst.OlympicGuessProcess);
            var loc5;
            (loc5 = GlobalStyle.textFormatPurple).font = FontUtil.EmbedNumberName;
            loc5.size = 18;
            loc5.align = flash.text.TextFormatAlign.CENTER;
            this._txtGoingDays = ObjCreate.createEmbedTextFiled("0", 343, 236, 30, 28, this, loc5);
            this._txtRightDays = ObjCreate.createEmbedTextFiled("0", 468, 236, 30, 28, this, loc5);
            return;
        }

        /* internal */ /* const */URLs: Array<any>=[ImagesConst.OlympicGuessAllWin, ImagesConst.OlympicGuess10Win, ImagesConst.OlympicGuess7Win, ImagesConst.OlympicGuess3Win, ImagesConst.OlympicGuessAllLost];

        /* internal */ /* var */_desc: OlympicGuessDesc;

        /* internal */ /* var */_txtGoingDays: Object /* flash.text.TextField */;

        /* internal */ /* var */_txtRightDays: Object /* flash.text.TextField */;
    }
